<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="/teleweb/common/global.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>中国通信服务</title>
<link href="teleweb/css/ztf.css" rel="stylesheet" type="text/css" />
<link href="teleweb/css/roll.css" rel="stylesheet" type="text/css" />
<link href="teleweb/css/content.css" rel="stylesheet" type="text/css" />
<link href="teleweb/css/upload-component.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="dwr/engine.js"></script>
<script type="text/javascript" src="dwr/util.js"></script>
<script type="text/javascript" src="dwr/interface/excel.js"></script>

<script>
	var t;//变量用于关闭setTimeout函数
	var value=1;
	function importData() {
		var str = window.showModalDialog("requestPage?page=excelimport&attachNum=1",null,"dialogWidth=510px;dialogHeight=300px");
		//alert(str);//关闭弹出窗口时的回传参数
	}
	function exportData() {
		var str = window.showModalDialog("exp-excel?className=User",null,"dialogWidth=510px;dialogHeight=300px");
		//alert(str);//关闭弹出窗口时的回传参数
	}
	function process() {
		excel.getSessionValueByName(callBackFortestMethod);
		t = setTimeout("process()", 100);//每0.1毫秒钟刷新一次
	}
	function callBackFortestMethod(data){
		for(var property in data){ 
			if(data["<%=Constant.EXCEL_IMPORT_NUM%>"] != null) {
				document.getElementById("value1").innerHTML = data["<%=Constant.EXCEL_IMPORT_NUM%>"];
			}
			if(data["<%=Constant.EXCEL_IMPORT_SUM%>"] != null) {
				document.getElementById("value2").innerHTML = data["<%=Constant.EXCEL_IMPORT_SUM%>"];
				value = data["<%=Constant.EXCEL_IMPORT_SUM%>"];
			}
			if(data["<%=Constant.EXCEL_IMPORT_NUM%>"] == value) {
				setTimeout("closeSetTimeout()", 1000);
			}
		}
	}
	function closeSetTimeout() {
		clearTimeout(t);
	}
</script>

</head>
<body>
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
  <!-- 主体table -->
  <%request.setAttribute("panel","Index");%>
  <%@ include file="/teleweb/common/include/header.jsp" %>
  <tr>
    <!---首页内容--->
    <td class="new_indexcontent">
    <!---圆角--->
    <div class="box-cir3">
			<div class="t_l"></div>
			<div class="t_m"></div>
			<div class="t_r"></div>
			<div class="m_l"></div>
			<div class="m_m1">
    <br/><br/>
    <div class="new_rangeform">
     
    	<a href="exp-excel?className=User" onclick="process()">Export Excel [导出]</a>&nbsp;&nbsp;<span id="value1">0</span>&nbsp;/&nbsp;<span id="value2">0</span><br/><br/> 
    	<!--<a href="#" onclick="exportData()">Export Excel [导出]</a><br/><br/>-->
    </div>
    <div class="new_rangeform">
	    <a href="#" onclick="importData()">Import Excel [导入]</a>
    </div>
    
    </div>
			</div>
			<div class="m_r"></div>
			<div class="b_l"></div>
			<div class="b_m"></div>
			<div class="b_r"></div>
		</div>
    </td>
  </tr>
  <tr>
    <td align="center" valign="top" class="bottom_bg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="38" align="center" valign="middle"><a href="contactus.html" class="bottom">联系我们</a>　|　<a href="sitemap.html" class="bottom">网站地图</a>　|　<a href="disclaimer.html" class="bottom">法律声明</a></td>
        </tr>
        <tr>
          <td height="18" align="center" valign="middle" class="h12px16">Copyright
            © 2011 中国通信服务股份有限公司</td>
        </tr>
        <tr>
          <td height="18" align="center" valign="middle" class="h12px16">010-58501528
            | 010-58501534 | <a class="h12px16" href="mailto:hqoa@chinaccs.com.cn">hqoa@chinaccs.com.cn</a></td>
        </tr>
      </table></td>
    <!-- 页脚 -->
  </tr>
</table>
</body>
</html>
